<?php
/**
 * 
 * @author ronnie  (comdeng@gmail.com)
 * @link    http://fillphp.com/
 * @date   2014-5-1
 * @file      Actions.php
 * @description 
 */
 
namespace com\demo\page\bbs;

use fillphp\page\Response;
class IndexAction extends \fillphp\page\Controller
{
	private $bbs;
	function head($cityId, $bbsId)
	{
		$this->bbs = array(
			'city_id' 	=> $cityId,
			'bbs_id'	=> $bbsId,
			'bbs_name'  => 'fillphp bbs',
		);
		//var_dump($this->bbs);
		//throw new \Exception('\fillphp\user\permission');
		return new Response();
	}
	
	function get()
	{
// 		echo($this->bbs);
// 		//throw new \Exception('\fillphp\user\permission');
// 		//return $this->redirect('http://www.baidu.com/', 400);
// 		return new Response('Hello');

		return $this->display('bbs/tpl/index.phtml', array(
			'bbs' => $this->bbs,
		));
	}
}

class TopicAction extends \fillphp\page\Controller
{
	/**
	 * @param int $topicId 帖子ID
	 * @return boolean
	 */
	function head($topicId)
	{
		
	}
	
	function get()
	{
		
	}
	
	function delete()
	{
		
	}
	
	function put()
	{
		
	}
	
	function post()
	{
		
	}
}